package org.starapp.generator;

import java.util.ResourceBundle;



public  class ResourceUtils {

	private static final String CONFIG_FILE="generator";
	private static ResourceBundle rb=null;
	private static String driver;
	private static String jdbcUrl;
	private static String user;
	private static String password;
	private static String tables;
	private static String srcOutputFolder;
	private static String pageOutputFolder;
	private static String templateFolder;
	private static String packageName;
	private static String author;
	private static String tablePrefix;
	
	private static String webModule;
	
	
	static{
		try{
		rb=ResourceBundle.getBundle(CONFIG_FILE);
		driver=rb.getString("db_driver");
		jdbcUrl=rb.getString("db_url");
		user=rb.getString("db_user");
		password=rb.getString("db_pass");
		packageName=rb.getString("package");
		srcOutputFolder=rb.getString("src_output_folder");
		pageOutputFolder=rb.getString("page_output_folder");
		templateFolder=rb.getString("template_folder");
		author=rb.getString("author");
		tablePrefix=rb.getString("table_prefix");
		webModule=rb.getString("web_module");
		}catch(Exception e){
			e.printStackTrace();
		}
	}

	public static String getDriver() {
		return driver;
	}

	public static void setDriver(String driver) {
		ResourceUtils.driver = driver;
	}

	public static String getJdbcUrl() {
		return jdbcUrl;
	}

	public static void setJdbcUrl(String jdbcUrl) {
		ResourceUtils.jdbcUrl = jdbcUrl;
	}

	public static String getUser() {
		return user;
	}

	public static void setUser(String user) {
		ResourceUtils.user = user;
	}

	public static String getPassword() {
		return password;
	}

	public static void setPassword(String password) {
		ResourceUtils.password = password;
	}

	public static String getTables() {
		return tables;
	}

	public static void setTables(String tables) {
		ResourceUtils.tables = tables;
	}
	public static String getSrcOutputFolder() {
		return srcOutputFolder;
	}

	public static void setSrcOutputFolder(String srcOutputFolder) {
		ResourceUtils.srcOutputFolder = srcOutputFolder;
	}

	public static String getTemplateFolder() {
		return templateFolder;
	}

	public static void setTemplateFolder(String templateFolder) {
		ResourceUtils.templateFolder = templateFolder;
	}

	public static String getPackageName() {
		return packageName;
	}

	public static void setPackageName(String packageName) {
		ResourceUtils.packageName = packageName;
	}

	public static String getAuthor() {
		return author;
	}

	public static void setAuthor(String author) {
		ResourceUtils.author = author;
	}

	public static String getTablePrefix() {
		return tablePrefix;
	}

	public static void setTablePrefix(String tablePrefix) {
		ResourceUtils.tablePrefix = tablePrefix;
	}

	public static String getPageOutputFolder() {
		return pageOutputFolder;
	}

	public static void setPageOutputFolder(String pageOutputFolder) {
		ResourceUtils.pageOutputFolder = pageOutputFolder;
	}

	public static String getWebModule() {
		return webModule;
	}

	public static void setWebModule(String webModule) {
		ResourceUtils.webModule = webModule;
	}
	
	
}
